<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
                    <li class="active"><a href="{:U('Shoufei/gongshiguanli')}">公式管理</a></li>
                    <li><a href="{:U('Shoufei/gongshiadd')}">新增公式</a></li>
		</ul>
            <form class="well form-search" method="get">
                    <label for="">公式名称：</label>
                    <input type="text" name="keyword" style="width: 300px;" value="" placeholder="请输入公式名称..."> &nbsp; &nbsp; &nbsp; &nbsp;
                    <input type="submit" class="btn btn-primary" value="搜索"> &nbsp; &nbsp;
<!--            <button type="button" class="btn btn-default btn-icon-text formula waves-effect huifu">恢复默认</button> &nbsp; &nbsp;
            <button type="button" class="btn btn-primary btn-icon-text formula waves-effect" data-toggle="modal" href="#add_formula"><i class="fa fa-plus "></i>新增公式</button>-->
            </form>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
                                            <th>公式名称</th>
                                            <th>计算公式</th>
                                            <th>操作</th>
						
					</tr>
				</thead>
				<tbody>
					<foreach name="info" item="vo">
					<tr>
						<td>{$vo.name}</td>
						<td>{$vo.wenben}</td>
                                                <td>
                                                    <a href="{:U('Shoufei/gongshiupdata',array('id'=>$vo['id']))}">修改</a>&nbsp;|&nbsp;
                                                    <a class='js-ajax-delete' href="{:U('Shoufei/gongshidelete',array('id'=>$vo['id']))}">删除</a>
                                                </td>
						
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>            
	<script src="__PUBLIC__/js/common.js"></script>
<!--        <script type="text/javascript">
            $(function(){
                $('.huifu').click(function(){
                    var aid=$(this).attr('data-id');
                    swal({
                        title:'您确定要删除所有模板，恢复默认值？',
                        type: "info", 
                        showCancelButton: true,
                        confirmButtonColor: "#AEDEF4",  
                        cancelButtonText: "取消",  
                        confirmButtonText: "确定",  
                        closeOnConfirm: false,   
                        closeOnCancel: true 
                    },function(isConfirm){
                        if (isConfirm){
                            $.post("/charge/huifu_formula.html",{aid:aid},function(msg){
                                if(msg.status == 0){
                                    sweetAlert({title:'',text: msg.info,type: "warning",timer:2000});
                                }
                                if(msg.status == 1){
                                    sweetAlert({title:'',text: msg.info,type: "success"});
                                    setTimeout(function(){window.location.reload()},2000);
                                }
                            });
                        }					
                    })
                });
            });
        </script>-->
    </body>
</html>